#pragma once
#include <signal.h>
#include <trend.h>
#include <strategy.h>
#include "util/pugixml.hpp"

enum class signal_type
{
	SGN_INVALID = 0,
	SGN_TICK = 1,
};

struct signal_info
{
	lt::sigid_t id;
	signal_type type;
	std::string param;

	signal_info() :id(0), type(signal_type::SGN_INVALID)
	{}
};

enum class trend_type
{
	TRD_INVALID = 0,
	TRD_LR = 1,
};
struct trend_info
{
	lt::sigid_t id;
	trend_type type;
	std::string param;

	trend_info() :id(0), type(trend_type::TRD_INVALID)
	{}
};

enum class strategy_type
{
	STG_INVALID = 0,
	STG_SSG_1 = 1
};

struct strategy_info
{
	lt::straid_t id;
	strategy_type type;
	bool openable;
	bool closeable;
	std::string param;

	strategy_info() :id(0), type(strategy_type::STG_INVALID), openable(true), closeable(true)
	{}
};

std::tuple<std::vector <signal_info>, std::vector <trend_info>, std::vector <strategy_info>> get_execute_config(const char* cfg_file,uint32_t date);

std::vector<uint32_t> get_trading_day_config(const char* cfg_file);
